<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" />

<link href="__PUBLIC__/Catalog/css/goodList.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="<?php echo U('Products/cateindex');?>" id="back"> < </a>商品例表
         </div>
   </div>
   <div class="filter">
        <div class="filter2">
           <span><a href="<?php echo U('Products/scity');?>">区域</a></span>
           <form action="<?php echo U('Products/index');?>" name="search" id="search" method="get" style="width:300px;float:right;">
           		<input type="hidden" name="citycode" value="<?php echo ($citycode); ?>"/>
           		<input type="hidden" name="cbegin" value='<?php echo ($cbegin); ?>'/>
           		<span class="price">
		    		<select  onChange="document.search.submit(); return false;" name="cid"  id="cid">
		    			<option value="-1">分类</option>
		    			<?php if(is_array($category)): foreach($category as $key=>$vo): ?><option value="<?php echo ($vo["categories_id"]); ?>" <?php if($vo["categories_id"] == $cid): ?>selected="selected"<?php endif; ?>><?php echo ($vo["categories_name"]); ?></option><?php endforeach; endif; ?>
		    		</select>       
		           </span>
		           <span class="price">
			           <select  onChange="document.search.submit(); return false;" name="sort"  id="sort">
			    			<option value="-1">排序</option>
			    			<option value="products_price asc" <?php if($sort == 'products_price asc'): ?>selected="selected"<?php endif; ?>>价格升</option>
			    			<option value="products_price desc" <?php if($sort == 'products_price desc'): ?>selected="selected"<?php endif; ?>>价格降</option>
			    			<option value="products_date_added desc" <?php if($sort == 'products_date_added desc'): ?>selected="selected"<?php endif; ?>>最新发布</option>
			    		</select>     
		           </span>
		           <span class="brand">
		           	  <select  onChange="document.search.submit(); return false;" name="productsType"  id="productsType">
			    			<option value="-1" >类型</option>
			    			<option value="1" <?php if($products_type == 1): ?>selected="selected"<?php endif; ?>>一口价</option>
			    			<option value="2" <?php if($products_type == 2): ?>selected="selected"<?php endif; ?>>拍卖</option>
			    			<option value="2" <?php if($products_type == 3): ?>selected="selected"<?php endif; ?>>公益</option>
			    		</select>     
		           </span>
           </form>
           
           
        </div>
   </div>
   <div class="products">
   		<?php if($productlist == ''): ?><div class="products_list">暂无商品，试试其他地区的</div><?php endif; ?>
        <?php if(is_array($productlist)): foreach($productlist as $key=>$vo): ?><div class="products_list">
	           <table>
	                
	                 <tr bordercolor="#FF0000">
	                    <td style="width:80px; height:70px;"><a href="<?php echo U('Products/detail');?>?pid=<?php echo ($vo["products_id"]); ?>"><img src="__PUBLIC__/images/products/thumb/s_<?php echo ($vo["products_image"]); ?>" /></a></td>
	                    <td style="width:190px; height:70px; padding-left: 5px;">
	                        <dl class="dls">
	                           <dt><a href="<?php echo U('Products/detail');?>?pid=<?php echo ($vo["products_id"]); ?>" style="font-size:18px; color:#000;"><?php echo ($vo["products_name"]); ?> &nbsp;&nbsp;￥<?php echo ($vo["products_price"]); ?></a></dt>
	                           <dd><a href="<?php echo U('Products/index');?>?publishuid=<?php echo ($vo["uid"]); ?>" class="phone"><!-- <?php echo ($vo["contact_tel"]); ?> -->  <?php echo ($vo["contact_person"]); ?> &nbsp;成交量：<?php echo ($vo["showcount"]); ?></a></dd>
	                           <dd><a href="#" class="dingwei"><!-- <?php echo ($vo["prov_name"]); ?>- --><?php echo ($vo["city_name"]); ?></a></dd>
	                           <dd><span class="time"><?php echo ($vo["products_date_added"]); ?></span> <span class="what"><?php echo ($vo["viewd"]); ?></span></dd>
	                        </dl>
	                    </td>
	                    <td style="width:70px; height:70px;">
	                           <p class="cc"><?php if($vo['up_flag'] == 1): ?><a href="#" class="ding"></a><?php endif; ?>
	                           <?php if($vo['jiaji_flag'] == 1): ?><a href="#" class="ji"></a><?php endif; ?></p>
	                    </td>
	                </tr>
	                
	           </table>
	       </div><?php endforeach; endif; ?>       
   </div>
</div>
<script>
/* $('#cid').bind("click",function(){
	var cid = $('#cid').val();
	//alert(cid);
	var sort=$('#sort').val();
	var products_type=$('#productsType').val();
	if(cid!='-1' && cid!='<?php echo ($cid); ?>'){
		window.location.href='<?php echo U("Products/index");?>?cid='+cid+'&sort='+sort+'&productsType='+products_type+'&citycode='+<?php echo ($citycode); ?>;
	}
	
});
$('#sort').bind("click",function(){
	var cid = $('#cid').val();
	var sort=$('#sort').val();
	var products_type=$('#productsType').val();
	if(sort!='-1' && sort!='<?php echo ($sort); ?>'){
		window.location.href='<?php echo U("Products/index");?>?cid='+cid+'&sort='+sort+'&productsType='+products_type+'&citycode='+<?php echo ($citycode); ?>;
	}
	
});
$('#productsType').bind("click",function(){
	var cid = $('#cid').val();
	var sort=$('#sort').val();
	var products_type=$('#productsType').val();
	
	if(products_type!='-1' && products_type!='<?php echo ($products_type); ?>'){
		window.location.href='<?php echo U("Products/index");?>?cid='+cid+'&sort='+sort+'&productsType='+products_type+'&citycode='+<?php echo ($citycode); ?>;
	}
	
});
 */
</script>
<div class="index-foot">
    <div class="index-foot2">
            <ul>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Index/index');?>"><img src="__PUBLIC__/Catalog/images/house.png" /></a></dd>
                      <dd><a href="<?php echo U('Index/index');?>">首页</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/images/cate1.png" /></a></dd>
                      <dd><a href="<?php echo U('Products/index');?>">商品</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd><a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/images/jia.png"style=" width:50px; height:50px;" /></a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/images/<?php if($count > 0): ?>message-hot.png<?php else: ?>message.png<?php endif; ?>" /></a></dd>
                      <dd><a href="<?php echo U('Membership/leaveword');?>">信息</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>"><img src="__PUBLIC__/Catalog/images/men.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>">我的</a></dd>
                  </dl>
              </li>
            </ul>       
    </div>
</div>
</body>
</html>